Skip to content

Conversation

Wilt
Copy link
Owner

@Wilt Wilt commented Feb 20, 2025

It should be possible to explicitly type route data.
This PR allows for optional typing of ActivatedRoute and ActivatedRouteSnapshot.
Fallback to the original "Data" type for backwards compatibility.

@Wilt
Copy link
Owner Author

Wilt commented Feb 20, 2025

@mmalerba Thanks for merging my other two suggestions angular/components#30324 and angular/components#30477 for optional typing.
This one is in the same line, but would have an even greater impact for all of those who ❤ strict typing (like @msmallest).

@mmalerba
Copy link

It looks like this PR is to your own fork, I assume you meant to send it to angular/angular?

@Wilt
Copy link
Owner Author

Wilt commented Feb 20, 2025

Yes, I guess I did that wrong.
I will need to resolve that at a later time. I will notify you when done.
Thank you for your patience.

Add optional typing to ActivatedRoute and ActivatedRouteSnapshot data to enforce strict route data typing.

Closes angular#30477
@Wilt Wilt merged commit f65bec9 into master Feb 22, 2025
6 of 13 checks passed
@Wilt
Copy link
Owner Author

Wilt commented Feb 22, 2025

@mmalerba

See here for a PR against the correct repository: angular#60064

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants